<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>绘制图片和文字</title>
    <style>
      body {
        margin: 0;
        padding: 0;
        background-image: url(../images/grid.png);
      }
      svg {
        background-color: rgba(255, 0, 0, 0.1);
      }
    </style>
  </head>
  <body>
    <!-- svg 2.0 -->
    <svg width="300" height="300" xmlns="http://www.w3.org/2000/svg">
      <image
        x="0"
        y="0"
        href="../images/googlelogo_color_92x30dp.png"
        width="100"
        height="100"
      ></image>
    </svg>
    <!-- svg 1.0 -->
    <svg
      version="1.0"
      baseProfile="full"
      width="300"
      height="300"
      xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink"
    >
      <image
        x="0"
        y="0"
        xlink:href="../images/googlelogo_color_92x30dp.png"
        width="100"
        height="100"
      ></image>
    </svg>
    <!-- svg 2.0 兼容 svg 1.0 -->
    <svg
      version="1.0"
      baseProfile="full"
      width="300"
      height="300"
      xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink"
    >
      <image
        x="0"
        y="0"
        xlink:href="../images/googlelogo_color_92x30dp.png"
        href="../images/googlelogo_color_92x30dp.png"
        width="100"
        height="100"
      ></image>
    </svg>
  </body>
</html>
